﻿#include"QuickSort.h"
#include"Heap.h"
#include"归并排序.h"
#include<stdlib.h>
#include<time.h>
void Heaptest()
{
	int arr[80];

	for (int i = 0; i < 80; i++)
	{
		arr[i] = rand() % 10000;
	}

	HeapSort(arr, 80);
	printf("\n");
	int i = 0;
	for (i = 0;i<80;i++)
	{
		printf("%d ", arr[i]);
	}
	printf("\ni = %d", i);
}

void QC()
{
	int arr[80];

	for (int i = 0; i < 80; i++)
	{
		arr[i] = rand() % 10000;
	}
	int countY=0;
	int countB=0;

	PartSort1(arr, 0, 79, &countB, &countY);
	printf("比较次数:%d,移动次数:%d\n", countB, countY);
	printf("\n");
	int i = 0;
	for (i = 0; i < 80; i++)
	{
		printf("%d ", arr[i]);
	}
	printf("\ni = %d", i);
}

void GBSort()
{
	int arr[80];

	for (int i = 0; i < 80; i++)
	{
		arr[i] = rand() % 10000;
	}
	int countY = 0;
	int countB = 0;

	GSort(arr, 0, 79, &countB, &countY);
	printf("\n");

	printf("比较次数:%d,移动次数:%d\n", countB, countY);
	printf("\n");
}
int main()
{
	srand((unsigned int)time(NULL));
	Heaptest();
	//QC();
	//GBSort();
	return 0;
}